<%@ page contentType="application/vnd.ms-excel; charset=utf-8" language="java" errorPage="" %>
<%@ page import="com.emotion.sshticket.utilitys.ValueUtil" %>
<%@ page import="com.emotion.sshticket.utilitys.StringUtil" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"  %>
<%
String today = StringUtil.toDate("yyyyMMddHHmmss");

response.setHeader("Content-Disposition","inline; filename=ticketList_"+today+".xls");
response.setHeader("Content-Description","JSP Generated Data");

%>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
</head>
<body>
	<table border="1">
	<colgroup>
			<col width="5%" />			
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
			<col width="10%" />
		</colgroup>
		<thead>
			<tr>
				<th>NO</th>
				<th>名前</th>
				<th>フリガナ</th>
				<th>TEL</th>
				<th>E-MAIL</th>
				<th>POSTADDR</th>
				<th>ADDR1</th>
				<th>ADDR2</th>
				<th>ADDR3</th>
				<th>1公演</th>
				<th>2公演</th>
				<th>金額</th>
				<th>状況</th>
				<th>メール転送</th>
				<th>会員ID</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${ticketList}" var="ticketList" varStatus="status">
				<tr onmouseover="bgColor='#fff4ff'" onmouseout="bgColor='#ffffff'" style="cursor:hand;" onclick="javascript:fn_view('${ticketList.seq}');">
				    <td>${status.index}</td>
				    <td>${ticketList.userNameF} ${ticketList.userNameS}</td>
				    <td>${ticketList.hiraganaF} ${ticketList.hiraganaS}</td>
				    <td>${ticketList.phone}</td>	
				    <td>${ticketList.userEmail}</td>	
				    <td>${ticketList.postAdd}</td>
				    <td>${ticketList.addr1}</td>
				    <td>${ticketList.addr2}</td>
				    <td>${ticketList.addr3}</td>
				    <td>${ticketList.onceTicket}</td>
				    <td>${ticketList.twiceTicket}</td>
				    <td>${ticketList.price}</td>
				    <td>${ticketList.payState}</td>
				    <td>${ticketList.mailYn}</td>
				    <td>${ticketList.userId}</td>
				</tr>
			</c:forEach>
				
			<c:if test="${empty ticketList}">
			<tr> 
				<td colspan="14">						  
			  		<spring:message code="common.nodata.msg" />				  		
			  	</td>
			</tr>				  	          				 			   
			</c:if>				
		</tbody>
</table>
</body>
</html>

